package com.example.controller;


import com.example.common.result.Result;
import com.example.entity.vo.CmsnaVo;
import com.example.mapper.CmsnaMapper;
import com.example.service.CmsnaService;
import com.example.untils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiangPandeng
 * @since 2024-02-28
 */
@RestController
@RequestMapping("/api/cmsna")
@Slf4j
@Api(tags = "付款条件档相关接口")
public class CmsnaController {
    @Resource
    private CmsnaMapper cmsnaMapper;
    @Resource
    private CmsnaService cmsnaService;

    @ApiOperation("销售付款条件vo列表查询")
    @GetMapping("/businessVoList")
    public Result<List<CmsnaVo>> businessVoList(){
        List<CmsnaVo> list = cmsnaMapper.selectCmsnaVoList("2");
        return Result.success(list);
    }

    @ApiOperation("采购付款条件vo列表查询")
    @GetMapping("/purchaseVoList")
    public Result<List<CmsnaVo>> purchaseVoList(){
        List<CmsnaVo> list = cmsnaMapper.selectCmsnaVoList("1");
        return Result.success(list);
    }

}
